package com.tsystems.school;

/**
 * Created by IntelliJ IDEA.
 * User: victorn
 * Date: 8/18/11
 * Time: 6:03 PM
 * To change this template use File | Settings | File Templates.
 */
public interface IExecutor {

    /**
     * Adds new task to execution queue
     * @param task - new task
     */
    void execute(Runnable task);

    /**
     * Interrupts execution
     */
    void interrupt();

    /**
     * Waits while all tasks are executed
     */
    void join();

}
